
//程序作用：求类型大小 关键字sizeof用法
//sizeof a ; sizeof int 
#include "stdio.h"
#include "stdlib.h"
//demo01_数据类型大小测试
int main()
{

	printf("int  :%d \n", sizeof(int)); //4
	printf("int* :%d \n", sizeof(int *));//value is 8 if system is 64 bit 
	printf("sizeof(int):%d\n", sizeof(int));
	printf("sizeof(int *):%d\n", sizeof(int *));

	//----------------------------------------------
	char a[5];
	char (*p1)[5];
	p1 = &a;
	char (*p2)[5] = &a;
	printf("char a[5]: %d\n", sizeof(a));
	printf("sizeof(p1):%d \n", sizeof(p1));
	printf("sizeof(*p1):%d \n", sizeof(*p1));
	printf("sizeof(*p2):%d \n", sizeof(*p2));
	//----------------------------------------------


	
	
	return 0;
}